<?php
class RM_Reports extends RM_Model_Flexible
{
    protected $_name = 'rm_reports';

    public function getAll(){

        $sql = "
            SELECT *
            FROM  `".$this->_name."`
        ";

        return $this->_getBySQL($sql);

    }

    /**
     * Returns the report data for the selected id
     *
     * @param string    $id
     * @return object containing recordset
     */
    public function getALLbyID($id){
        $sql = "
            SELECT *
            FROM  `".$this->_name."`
            WHERE `id`='".$id."'
            LIMIT 1
        ";

        return $this->_getBySQL($sql);
    }

    public function resetCriteria(){
        $criteria['offset'] = 0;
        $criteria['language'] = false;
        $criteria['start_datetime'] = false;
        $criteria['end_datetime'] = false;
        $criteria['image'] = false;
        $criteria['prices_from']  = false;
        $criteria['prices_to']  = false;
        return new RM_Unit_Search_Criteria($criteria);
    }
}